module Utils
  module Style
    protected
      def start_small_rounded_module_wrapper
        start_small_module_wrapper(true)
      end

      def start_small_module_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("small_module_round_wrapper","small_module_spiffy_top",true) if round
        rvalue << "<div class=\"small_module_wrapper\">"
        rvalue
      end

      def start_large_rounded_module_wrapper
        start_large_module_wrapper(true)
      end

      def start_large_module_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("large_module_round_wrapper","large_module_spiffy_top",true) if round
        rvalue << "<div class=\"large_module_wrapper\">"
        rvalue
      end

      def end_rounded_module_wrapper
        end_module_wrapper(true)
      end

      def end_module_wrapper(round = false)
        rvalue = ""
        rvalue << "</div>"
        rvalue << bottom_round("module_spiffy_bottom") if round
        rvalue
      end

      def start_tiny_rounded_div_wrapper
        start_tiny_div_wrapper(true)
      end

      def start_tiny_div_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("tiny_round_wrapper","spiffy_div_top") if round
        rvalue << "<div id=\"tiny_wrapper\">"
        rvalue
      end

      def start_small_rounded_div_wrapper
        start_small_div_wrapper(true)
      end

      def start_small_div_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("small_round_wrapper","spiffy_div_top") if round
        rvalue << "<div id=\"small_wrapper\">"
        rvalue
      end

      def start_medium_rounded_div_wrapper
        start_medium_div_wrapper(true)
      end

      def start_medium_div_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("medium_round_wrapper","spiffy_div_top") if round
        rvalue << "<div id=\"medium_wrapper\">"
        rvalue
      end

      def start_large_rounded_div_wrapper
        start_large_div_wrapper(true)
      end

      def start_large_div_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("large_round_wrapper","spiffy_div_top") if round
        rvalue << "<div id=\"large_wrapper\">"
        rvalue
      end

      def end_rounded_div_wrapper(round = false)
        end_div_wrapper(true)
      end

      def end_div_wrapper(round = false)
        rvalue = ""
        rvalue << "</div>"
        rvalue << bottom_round("spiffy_div_bottom") if round
        rvalue
      end

      def start_rounded_bar_wrapper
        start_bar_wrapper(true)
      end

      def start_bar_wrapper(round = false)
        rvalue = ""
        rvalue << top_round("bar_round_wrapper","spiffy_bar") if round
        rvalue << "<div id=\"bar_wrapper\">"
        rvalue
      end

      def end_rounded_bar_wrapper
        end_bar_wrapper(true)
      end

      def end_bar_wrapper(round = false)
        rvalue = ""
        rvalue << "</div>"
        rvalue << bottom_round("spiffy_bar") if round
        rvalue
      end

      def top_round(div_klass,spiffy_klass,is_class = false)
        div_type = "id"
        div_type ="class" if is_class
        return <<-round_tags
          <div #{div_type}="#{div_klass}">
            <b class="#{spiffy_klass}">
              <b class="spiffy1"><b></b></b>
              <b class="spiffy2"><b></b></b>
              <b class="spiffy3"></b>
              <b class="spiffy4"></b>
              <b class="spiffy5"></b>
            </b>
        round_tags
      end

      def bottom_round(spiffy_klass)
        return <<-round_tags
          <b class="#{spiffy_klass}">
            <b class="spiffy5"></b>
            <b class="spiffy4"></b>
            <b class="spiffy3"></b>
            <b class="spiffy2"><b></b></b>
            <b class="spiffy1"><b></b></b>
          </b>
        </div>
        round_tags
      end
  end#end Style module
end
